package com.yunduansing.demo.service.impl;

import com.yunduansing.demo.entity.UserPostEntity;
import com.yunduansing.demo.mapper.UserPostMapper;
import com.yunduansing.demo.service.UserPostService;

import java.util.List;
import java.util.stream.Collectors;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户岗位表 服务实现类
 * </p>
 *
 * @author yunduansing
 * @since 2020-05-24
 */
@Service
public class UserPostServiceImpl extends ServiceImpl<UserPostMapper, UserPostEntity> implements UserPostService {

    @Override
    public List<UserPostEntity> getPostIdsByUserIds(List<Integer> userIds) {
        var wrapper=new QueryWrapper<UserPostEntity>();
        wrapper.in("user_id", userIds);
        var data= list(wrapper);
        return data;
    }

}
